package com.study.design.pattern.pattern.creational.prototype;

import java.util.Date;

/**
 * @Author: gongsl
 * @Date: 2025-03-08 23:59
 * @description:
 */
public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
        Persion persion = new Persion();
        persion.setName("Tom");
        persion.setAge(26);
        persion.setBirthDay(new Date(0L));
        System.out.println(persion);
        System.out.println("============分割线============");

        Persion clone = (Persion) persion.clone();
        clone.setName("Jerry");
        clone.getBirthDay().setTime(666666666666L);

        System.out.println(persion);
        System.out.println(clone);
    }
}
